using System;

namespace Core.Domain.Enums
{
  ///<summary></summary>
  public class ElectionParticipationMethod : BaseEnumeration<ElectionParticipationMethod, string>
  {
    private readonly string _displayName;

    ///<summary>Was mailed in</summary>
    public static readonly ElectionParticipationMethod MailedIn = new ElectionParticipationMethod("Mail", "Mailed In", "Mailed");
    
    ///<summary></summary>
    public static readonly ElectionParticipationMethod DroppedOff = new ElectionParticipationMethod("Drop", "Dropped Off", "DroppedOff");
    
    ///<summary></summary>
    public static readonly ElectionParticipationMethod VotedInPerson = new ElectionParticipationMethod("Person", "Voting in Person", "VotedInPerson");

    ///<summary>Empty inner value</summary>
    public static readonly ElectionParticipationMethod NotSubmitted = new ElectionParticipationMethod("", "Not Submitted", "No");

    private string _oldValue;

    private ElectionParticipationMethod(string innerValue, string displayName, string oldValue) : base(innerValue, displayName)
    {
      _oldValue = oldValue;
    }

    
    static ElectionParticipationMethod()
    {
      Add(NotSubmitted);
      Add(DroppedOff);
      Add(MailedIn);
      Add(VotedInPerson);
    }

    public string OldValue
    {
      get { return _oldValue; }
    }

    public ElectionParticipationMethod Parse(string value)
    {
      switch(value.ToLower())
      {
        case "mail":
          return MailedIn;
        case "drops":
          return DroppedOff;
        case "person":
          return VotedInPerson;
      }
      return NotSubmitted;
    }
  }

  /////<summary>How was this ballot submitted?</summary>
  //public enum ElectionParticipationMethodX
  //{
  //  ///<summary>Mailed in before election</summary>
  //  MailedIn,
  //  ///<summary>Dropped off at location by the voter</summary>
  //  DroppedOff,
  //  ///<summary>Dropped off at location by someone else for the voter</summary>
  //  DroppedOffByOther,
  //  ///<summary>Ballot deposited at location by the voter</summary>
  //  VotedInPerson,
  //  ///<summary>Not submitted</summary>
  //  NotSubmitted,
  //  ///<summary>Person is in attendance, planning to deposit ballot. Deposit not yet received!</summary>
  //  InAttendanceVoteNotYetReceived
  //}
}